<template>
  <tr>
    <td>{{ id }}</td>
    <td>{{ name }}</td>

    <!-- 如果价格超过100，就有red这个类 -->
    <td :class="price > 100 ? 'red' : ''">{{ price }}</td>
    <td>{{ time }}</td>
    <td><a href="#" @click="btn(ind)">删除</a></td>
  </tr>
</template>

<script>
export default {
  props: ["id", "name", "price", "time", "ind"],
  methods: {
    btn(ind) {
      this.$emit("del", ind);
    },
  },
};
</script>

<style>
</style>